package bean;

import lombok.*;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * @classname:Permission
 * @description:
 * @author: Mr.Z
 * @date: 2020/12/29 21:01
 * @version: 0.1
 * @since:1.8
 */
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class Permission {
    private Integer id;
    private String path;
    private Integer parentPathId;
    private boolean is_parent;
    private String desc;

    public Permission( ResultSet rs) {
        try {
            this.id = rs.getInt("id");
            this.path = rs.getString("path");
            this.parentPathId = rs.getInt("parentPathId");
            this.is_parent = rs.getBoolean("is_parent");
            this.desc = rs.getString("desc");


        } catch (SQLException e) {
            e.printStackTrace();
        }
    }
}
